This invention relates to the generation of the spacing of characters for output to devices such as display screens, laser printers, photo typesetters and laser film recorders at a range of pointsizes.
A set of characters with a particular design is called a xe2x80x9ctypefacexe2x80x9d. A digital font (referred to here simply as a xe2x80x9cfontxe2x80x9d), such as any of the PostScript(copyright) fonts available from Adobe Systems Incorporated of San Jose, Calif., generally includes instructions (normally read and interpreted by rendering programs executing on computer processors) for rendering characters in a particular typeface. A digital font stores outlines and xe2x80x9chintsxe2x80x9d of characters along with the font""s so-called xe2x80x9cfont metricsxe2x80x9d, which relate to the spacing of characters in order to form words of text. Digital font formats are described in detail in the literature. See, for example, Peter Karow, Digital Typefaces, Springer Verlag, 1994, ISBN 3-540-56509-4, pages 139 et seq. As used here, the term xe2x80x9ccharacterxe2x80x9d refers to any form of character, number, symbol, icon, graphic, or the like that can be output as a graphical element.
The appearance of a typeface is affected not only by the appearance of individual characters, but also by the way the characters are spaced within a character string. See, for example, Peter Karow, Font Technology, Springer Verlag, 1994, ISBN 3-540-57223-6, pages 173 et seq. Accordingly, fonts that support proportional spacing often include spacing metrics providing instructions for defining the spaces between characters.
Furthermore, text processing software may supply xe2x80x9ctrackingxe2x80x9d, which provides a constant small amount of additional space between the characters in text output. If a positive or negative tracking value is chosen, that amount is applied no matter what the character pairs are or the pointsize is. Tracking does not take in account that different character pairs require different amounts of additional spacing.
Spacing metrics for enabling proportional spacing are typically generated for output at a specific pointsize, traditionally 12 points, and if an application calls for output at a different pointsize, the spacing is simply scaled linearly. This will be referred to as xe2x80x9ctraditionalxe2x80x9d spacing. Unfortunately, linear scaling based on spacing metrics for a single reference pointsize does not produce consistently good results. This is because proper spacing between a character pair can vary with different typefaces, different pairs of characters, and different pointsizes. In general, for clear output, characters at smaller pointsizes require proportionally larger intercharacter spaces than do characters at larger pointsizes.
Existing techniques for spacing each character pair based on the specific characteristics of that character pair are costly to use. One method, termed xe2x80x9cautomatic kerningxe2x80x9d, calculates spacing between specific character pairs at output pointsizes on demand, within an application program like Adobe PageMaker. Traditionally, xe2x80x9ckerningxe2x80x9d refers to a technique of adjusting the spacing of only specific character pairs (called xe2x80x9ccritical character pairsxe2x80x9d) based on the shapes of the character strokes. Automatic kerning recognizes that all pairs are critical character pairs and have special spacing requirements, and also recognizes that wider spacing is generally required for characters output at smaller pointsizes, whereas narrower spacing is generally required for characters output at larger pointsizes. Automatic kerning is explained in greater detail in commonly assigned European Patent EP 0 465 704 B1, which discloses a method for automatically generating, for a font at a pointsize, kerning values for a set of critical character pairs and sidebearing values for all characters of the font.
However, automatic kerning requires analysis of the specific font, the specific pointsize, and the specific character combination each time it is applied. Accordingly, it often requires more processing time and power than is reasonably available.
In general, in one aspect, the invention features methods and apparatus for justifying text to a margin. The method includes the steps of obtaining a kerning value for a character pair consisting of a space character and a non-space character; and positioning the nonspace character at the margin according to the kerning value.
Among the advantages of the invention are the following. The invention provides pointsize-variable kerning of characters against the space character to provide visually attractive alignment of justified text to a margin to create what will be called the xe2x80x9coptical marginxe2x80x9d. The invention also provides pointsize-variable kerning for characters against the space character to provide visually pleasing alignment of justified text to left and right optical margins. The invention may be applied over tracking. The invention may be used with existing digital fonts. The invention may be implemented to achieve its advantages at very little cost in execution time.
For a fuller understanding of the nature and further advantages of the invention, reference should be made to the detailed description taken in conjunction with the accompanying drawings.